Lab 1

I chose to do Chapter 4's lab from Visualize This to try and improve my understanding of code-based visualization software. I have previously struggled trying to write Java Applets and so the task seemed daunting, but after lots of mistake making I seem to have learned the basics of making different plots in R.

The first task is to set the directory for the data. The smallest syntax mistake can prevent anything from showing up so I learned quickly to double check everything.
lab_ch4_1.jpg
Above is a bar graph created in RStudio with some minor modifications in colour and borders.

Next, I learned how to put conditions on the data set. Below, all hot dog contest winners who were American born are shown in red. This is done by employing "if/else" logic.
lab_ch4_2.jpg

This next graph draws from an additional piece of data in the dataset. The bars highlighted in red mark years where the existing record of hot dogs eaten was beaten. This is just a case of using a line of code that instructs R to include this data and how it should be included.
lab_ch4_3.jpg

The next chart is a scatterplot made in R, which requires essentially the same syntax but modifications in the chart type you indicate in your code. This is a good example of what a chart looks like without modifying the labels and limits.
lab_ch4_5.jpeg
Here is a line graph made in R. The Y-axis value labels have automatically tried to shorten themselves in R from the 10-digit numbers in the CSV file, but this can be remedied in Illustrator you will see below.
lab_ch4_7.jpeg
One difficulty I've encountered with R is how arbitrary the language is. While this is true for all languages, it adds a significant learning curve compared to software like Tableau, Illustrator, and other GUI. However, RStudio does have a significant advantage over R by integrating some graphics in the plotting section.



Lab 2 - Chapter 6 - Visualizing Relationships

After tinkering around with RStudio a bit, I decided to look into what kind of options I had to better these graphs in Illustrator.

Here is a very rudimentary graph created with RStudio using the plot and scatter.smooth commands. The line shows a correlation between crimes and murders in the US.
chapter5_3_2.jpg


Here is the graph after being edited in Illustrator. When the above graph is exported as a PDF, it is really easy to edit text and lines since they are all clickable elements in Illustrator.

chapter5_3.jpg
After this initial tampering with my first graph I noticed a few things about going from RStudio to Illustrator. Naturally, Illustrator can be a bit more labour intensive than RStudio. Creating a look for the graph and making sure all elements are coloured, positioned, and resized consistently can be finicky. Also, since there is nothing binding the data to its original position, one could accidentally move a line or a dot out of place, possibly without noticing.

Next, I took a look at some more graphic options in RStudio. Below is a bubble chart displaying information from the same dataset as the above charts.

bubbleplot.jpeg


While it is still pretty bare, it is definitely an improvement from the charts that have the coded titles as the axis titles (e.g. crime$burglary). While the labels on the bubbles are not particularly effective in this example, it is an addition that may work for another situation. Ultimately, this example shows that R can create some decent-looking graphs without needing to get into Illustrator.

birthhist.jpg
Above is a histogram made in RStudio and then altered in Illustrator. The first important thing is the ability to add more text data to help explain what the graph is showing, like the note made about the median. Another important lesson from this graph is that most problems that can be remedied in R probably should be. Specifically, the numbering of the x-axis is problematic since it doesn't start at 0 (while the y-axis does) and the data spills into the area undefined by the x-axis. While this could be fixed in Illustrator, it is probably better practice to fix it in R for the sake of consistency and accuracy.

While R is a really powerful tool for organizing and displaying data, its graphs often lack clarity. While there is code that you can write to fix axis titles and other labels, for someone comfortable with Illustrator it probably makes the most sense to just edit them in Illustrator along with the font and overall look and feel. A graph can be exported from R practically incomprehensible, a few quick changes in Illustrator can quickly better it. I do wish there was some way of applying a sort of "style sheet" to these graphs in Illustrator. My understanding is that we are limited to setting text styles and colour swatches, but it would be so much faster if graph could be imported into Illustrator and then a "theme" could be applied to match previous graphs.